package vn.axonivy.vision.streams;

import java.util.ArrayList;
import java.util.List;

public class ForEach {
	public static void main(String[] args) {
		/*
		 * This method helps in iterating over all elements of a stream and
		 * perform some operation on each of them. The operation is passed as
		 * lambda expression parameter.
		 */

		List<String> memberNames = new ArrayList<>();
		memberNames.add("Amitabh");
		memberNames.add("Shekhar");
		memberNames.add("Aman");
		memberNames.add("Rahul");
		memberNames.add("Shahrukh");
		memberNames.add("Salman");
		memberNames.add("Yana");
		memberNames.add("Lokesh");

		memberNames.forEach(System.out::println);
	}
}
